package pl.ydp.components.mathcell.mathrecognizer.model.descriptors
{
	public class SizeDescriptor
	{		
		public static const UNKNOWN:Number = 1;
		
		
		
		public static const SHORTER	:Number 		= 1024*1;
		public static const LONGER	:Number 		= 1024*2;
		public static const ABOUT_15:Number 		= 1024*4;
		public static const ABOUT_25:Number 		= 1024*8;
		
		public static const WHOLE	:Number 		= 2; 
		public static const HALF	:Number 		= 4; 
		public static const QUARTER	:Number 		= 8;
		public static const THREE_QUARTERS	:Number 		= 16;    
		
		public static const WIDTH:Number	= 1048576*1;
		public static const HEIGHT:Number	= 1048576*2;
		public static const LENGTH:Number	= 1048576*4;
		
		public static const THAN_WIDTH:Number = 16777216*1;
		public static const THAN_HEIGHT:Number = 16777216*2;
		public static const THAN_LENGTH:Number = 16777216*4;
		
		
		
		public static const IS_WIDER:Number 	= WIDTH | LONGER | THAN_WIDTH;
		public static const IS_NARROWER:Number 	= WIDTH | SHORTER | THAN_WIDTH;
		public static const IS_HIGHER:Number 	= HEIGHT | LONGER | THAN_HEIGHT;
		public static const IS_LOWER:Number 	= HEIGHT | SHORTER | THAN_HEIGHT;  
		
		public static const IS_WIDER_THAN_HALF:Number 		= WIDTH | LONGER | THAN_WIDTH | HALF;
		public static const IS_NARROWER_THAN_HALF:Number 	= WIDTH | SHORTER | THAN_WIDTH | HALF;
		public static const IS_HIGHER_THAN_HALF:Number 		= HEIGHT | LONGER | THAN_HEIGHT | HALF;
		public static const IS_LOWER_THAN_HALF:Number 		= HEIGHT | SHORTER | THAN_HEIGHT | HALF; 
		
		public static const IS_WIDER_THAN_QUARTER:Number 		= WIDTH | LONGER | THAN_WIDTH | QUARTER;
		public static const IS_NARROWER_THAN_QUARTER:Number 	= WIDTH | SHORTER | THAN_WIDTH | QUARTER;
		public static const IS_HIGHER_THAN_QUARTER:Number 		= HEIGHT | LONGER | THAN_HEIGHT | QUARTER;
		public static const IS_LOWER_THAN_QUARTER:Number 		= HEIGHT | SHORTER | THAN_HEIGHT | QUARTER; 
		
		
		//
		//    VALUE BIT STRUCTURE:
		//
		//     _   _   _   _   _   _   _
 		//     L   H   N   W   X   Y   0
 		//
 		//     X,Y = 1,1 - 100%
 		//     X,Y = 0,1 - 50%
 		//     X,Y = 1,0 - 25%
 		//  
 		//     ex. IS_HIGHER_THAN_HALF   = 0 1 0 0 0 1 0
 		//     ex. IS_WIDER_THAN_QUARTER = 0 0 0 1 1 0 0
 		//  

	}
}